<script type="text/javascript">
        $(document).ready(function(){
            $("#main-slider").carouFredSel({
                items               : 1,
                direction           : "left",
                pagination          : ".pag",
                scroll              : {
                    items           : 1,
                    easing          : "swing",
                    duration        : 1000,                        
                    pauseOnHover    : true
                }
            });
        });
    </script>
<div id='wrapper'>
    <?php $this->widget('FrontMenuWidget'); ?>
    <div id="slider">
            <div class="container">
            
                <div id="main-slider">
                <?php foreach ($slide as $key => $value):?>
                    <div class="slide">
                        <img src="<?php echo Yii::app()->baseUrl; ?>/timthumb.php?src=/images/slide/<?php echo $value['SlidePhotoName'];?>&amp;h=400&amp;w=940" width="940" height="400" />
                        <div class="info">
                            <h2><?php echo $value['SlideName'];?></h2>
                            <p><?php echo $value['content']['Short_Descriptions'];?></p>
                            <div class="text-right">
                                <a href="<?php echo Yii::app()->baseUrl?>/content/<?php echo $value['SlideNameRewrite']?>" class="read_more">XEM THÊM</a>
                            </div>
                        </div>
                    </div>
                    <?php endforeach;?>
                </div>
                <div class="pag"></div>
            </div>
        </div>
</div>
<div id="main">
    	<div class="container">
        <?php
        $i =0;
        foreach ($data as $key => $value) {
            $xx = ($i == 0 ? ('fl') : (($i==1) ? 'fl center' : 'fr'));
            echo '<div class="box '.$xx.'">';
            // foreach ($value['product'] as $k => $v) {
            //     var_dump($v);
            // }
            echo '<img src="'.Yii::app()->baseUrl.'/timthumb.php?src=/images/cover/'. $value['CoverPhoto'].'&amp;h=227&amp;w=300" width="300" height="227">';
            echo '<a href="danh-muc-san-pham/'.$value['SubCateNameRewrite'].'.html" class="title" title="'.$value['SubCateName'].'">'.$value['SubCateName'].'</a>';
            echo '</div>';
            if($i == 2){
                echo '<div class="clear"></div>';
            }
            $i++;
        }
        ?>            
        </div>
    </div>
